package com.zs.ktsms.service.impl;

import com.zs.ktsms.mapper.SysRoleMapper;
import com.zs.ktsms.pojo.SysRole;
import com.zs.ktsms.service.SysRoleService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ZhouShuang
 * @version 17
 * @Title
 * @date 2025/5/31 下午9:19
 */
@Service
public class SysRoleServiceImpl implements SysRoleService {

    @Resource
    private SysRoleMapper sysRoleMapper;
    /**
     * 查询所有
     *
     * @return
     */
    @Override
    public List<SysRole> selectAll() {
        return sysRoleMapper.selectAll();
    }

    /**
     * 添加
     *
     * @param sysRole
     * @return
     */
    @Override
    public int add(SysRole sysRole) {
        return sysRoleMapper.add(sysRole);
    }

    /**
     * 详情
     *
     * @param id
     * @return
     */
    @Override
    public SysRole detail(Integer id) {
        return sysRoleMapper.detail(id);
    }

    /**
     * 修改
     *
     * @param sysRole
     * @return
     */
    @Override
    public int update(SysRole sysRole) {
        return sysRoleMapper.update(sysRole);
    }

    /**
     * 删除
     *
     * @param id
     * @return
     */
    @Override
    public int delete(Integer id) {
        return sysRoleMapper.delete(id);
    }
}
